Skip to main content

Your SDK Integration

Here you will learn how to add the Group Link SDK to your SDK and start it from your SDK.

Step 1 - Build settings​

In your SDK framework target, confirm that the following build settings are correct:

Xcode nameSettingValue
Build Libraries for DistributionBUILD_LIBRARY_FOR_DISTRIBUTIONYES
Skip InstallSKIP_INSTALLNO

If your SDK is already distributed as an XCFramework, both settings will already be correct.

Where and how to change: your SDK project → framework TARGET → Build Settings → filters All + Combined → search the setting → if needed, change the value for all configurations (Debug and Release).

Note: The search accepts both the Xcode name (e.g. Build Libraries for Distribution) and the setting name (e.g. BUILD_LIBRARY_FOR_DISTRIBUTION). By default, the list shows the Xcode names; to see the setting names: Editor → Show Setting Names.

IMG-02 — Build Libraries for Distribution

Build Libraries for Distribution set to Yes

IMG-03 — Skip Install

Skip Install set to No

If the value comes from somewhere else, change it there; otherwise, it overrides what was done in Xcode. To find where it comes from: Build Settings → Levels view, which shows in which column (target, project, .xcconfig) the value is defined.

IMG-04 — Levels view

Build Settings in the Levels view

Step 1a - Alternative setup via .xcconfig​

.xcconfig of the framework target:

BUILD_LIBRARY_FOR_DISTRIBUTION=YES
SKIP_INSTALL=NO

Step 1b - Alternative setup via XcodeGen​

XcodeGen (project.yml):

targets:
YourSDK:
type: framework
settings:
base:
BUILD_LIBRARY_FOR_DISTRIBUTION: YES
SKIP_INSTALL: NO

Step 1c - Alternative setup via Tuist​

Tuist (Project.swift):

.target(
name: "YourSDK",
destinations: .iOS,
product: .framework,
bundleId: "…",
sources: ["Sources/**"],
settings: .settings(base: [
"BUILD_LIBRARY_FOR_DISTRIBUTION": "YES",
"SKIP_INSTALL": "NO"
])
)

Step 1d - Alternative setup via command line (build script)​

Build script (xcodebuild archive):

xcodebuild archive \
-project YourSDK.xcodeproj \
-scheme YourSDK \
-configuration Release \
-destination "generic/platform=iOS" \
-archivePath build/ios.xcarchive \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO

Adding a new package to your project​

  1. In Xcode, find the left panel and click your PROJECT.
  2. At the top of the opened window, click the Package Dependencies tab.
  3. The list of packages used in the project will be shown.
  4. Click the + button at the bottom left of this list to add a new package.

IMG-05 — Package Dependencies

Adding a new package to the project

Searching the package by its GitHub URL​

  1. In the search field, at the top right corner of the window, paste the repository URL:
https://github.com/Group-Link-One/iOSGrouplinkStatic
  1. In a few moments, the iosgrouplinkstatic result will show up in the list.
  2. Click iosgrouplinkstatic to select it.
  3. Check that the Dependency Rule is set to Up to Next Major Version and keep the version filled in by Xcode.
  4. Click Add Package to add iosgrouplinkstatic to the project.

⚠️ Warning: Make sure the Dependency Rule is set correctly. In the Dependency Rule, do not use the Up to Next Minor Version, Branch, Exact Version, Range of Versions or Commit options. The correct setting is Up to Next Major Version. This setting ensures you will always use a compatible version of the SDK published by Group Link One.

IMG-06 — Search Package

Searching the iOSGrouplinkStatic package by its GitHub URL

Choosing the package products​

Xcode will resolve the package and open the Choose Package Products for iOSGrouplinkStatic window.

  1. Check that the GroupLinkStatic package is in the list.
  2. In the Add to Target column, confirm it is associated with your SDK framework target.
  3. Click Add Package to confirm adding the package.

IMG-07 — Choose Package Products

Choosing the iOSGrouplinkStatic package products

Checking the installation​

When it finishes, you will be back on the Package Dependencies tab. There, confirm that everything is correct:

  • The list must now show the GroupLinkStaticPackage package.
  • The GroupLinkStaticPackage package shows:
    • Location: https://github.com/Group-Link-One/iOSGrouplinkStatic
    • Dependency Rule: Up to Next Major Version
    • Value: <CURRENT_PACKAGE_VERSION>

IMG-08 — Package Dependencies

Checking the GroupLinkStaticPackage package installation

Check that the GroupLinkStatic package was added correctly:

IMG-09 — Frameworks and Libraries

GroupLinkStatic in the framework TARGET → General → Frameworks and Libraries

IMG-10 — Link Binary With Libraries

GroupLinkStatic in the framework TARGET → Build Phases → Link Binary With Libraries

[OPTIONAL] - If the build fails with No such module 'GroupLinkStatic'​

This error happens when the GroupLinkStatic package was not added correctly to Link Binary With Libraries. You need to check whether the Link Binary With Libraries phase exists in your framework Build Phases.

If the phase does not exist:​

  1. Go to the framework TARGET → Build Phases → + → New Link Binary With Libraries Phase.

IMG-11 — New Link Binary With Libraries Phase

New Link Binary With Libraries phase

  1. Click + in the new Link Binary With Libraries phase.

IMG-12 — Clicking + in the new Link Binary With Libraries phase

Clicking + in the new Link Binary With Libraries phase

  1. Add GroupLinkStatic to the new Link Binary With Libraries phase.

IMG-13 — Adding GroupLinkStatic to the new phase

Adding GroupLinkStatic to the new Link Binary With Libraries phase

If the phase exists:​

  1. Go to the framework TARGET → Build Phases → Link Binary With Libraries.
  2. Check that GroupLinkStatic is listed.

IMG-10 — GroupLinkStatic listed

GroupLinkStatic listed in Link Binary With Libraries

If the error persists, remove the package and add it again following the steps above.

  • PROJECT → Package Dependencies → select GroupLinkStaticPackage → − → Remove.
  • Add the package again (step above), choosing your SDK framework TARGET in Add to Target.

Put the Group Link SDK start inside your SDK init:

import Foundation
internal import GroupLinkStatic // Internal import of the Group Link SDK

@objc public final class YourSDKManager: NSObject {

@MainActor
@objc public static func start() {
// ... your SDK current initialization ...

if #available(iOS 15.0, *) {
// Group Link SDK start
GroupLinkSDK.start(appLabel: "<GROUPLINK_APP_LABEL>")

// Required permissions
GroupLinkSDK.startBluetooth()
GroupLinkSDK.startLocation()

// Remote ID setup (can be called at any time after the Group Link SDK start)
GroupLinkSDK.setRemoteId("<REMOTE_ID>")
}
}
}

⚠️ Warning: internal import must be used in every file that imports the Group Link SDK. Do not use a plain import, nor @_implementationOnly.

Next steps​

Your SDK Verification